<?php
include("../include/dbcommon.php");
include("geotekhFunctions.php");
$sizeSystemId=$_GET["system"];
$rowNum=$_GET["rownum"];
$breakupDefault=$_GET["breakupDefault"];

$strSQL="SELECT * 
FROM  size_breakup 
WHERE  size_system_id=".$sizeSystemId;
$rs=db_query($strSQL,$conn);
$data=db_fetch_array($rs);
$breakupDefaultArray=json_decode($breakupDefault);
foreach($data as $key=>$value){
$outputArray[0][$value['size_code']]="<input id=size_".$rowNum."_".$value['id']." value='".$breakupDefaultArray[$value['size_code']]."' class='size_breakup_".$rowNum."' size=4/>";
} 
//$outputArray[0]["Total"]="<input id=total_size_breakup_".$rowNum." value='0' size=4/>";
echo "<div id='addSizebreakupdialog_".$rowNum."' title='Add size breakup' style='height:50%;border:1px solid black;'>".createHorizontalTable($outputArray)."</div>";
?>